package com.asohofrucol.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.asohofrucol.model.ColVillage;

public interface ColVillageDao extends JpaRepository<ColVillage, String> {

	@Query("SELECT p FROM ColVillage p WHERE p.colMunicipality.codMunicipality = :codMunicipality ORDER BY p.namVillage")
	public List<ColVillage> listByCodMunicipality(
			@Param("codMunicipality") String codMunicipality);
}
